package com.shangma.cn.entity.base.impl;

import com.baomidou.mybatisplus.annotation.TableName;
import com.shangma.cn.commons.valid.BtnGroup;
import com.shangma.cn.commons.valid.DirectoryGroup;
import com.shangma.cn.commons.valid.MenuGroup;
import com.shangma.cn.commons.valid.anno.GenderEnum;
import com.shangma.cn.entity.base.BaseEntity;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 开发人员: 辉哥真球帅
 * 联系方式: zhengzhoudaxuevip@163.com
 * 创建时间: 2021/10/12  10:27
 * 文件含义:
 */
@TableName("sys_menu")
@Data
public class Menu extends BaseEntity {

    @NotBlank(message = "权限名称不能为空", groups = {DirectoryGroup.class, MenuGroup.class, BtnGroup.class})
    private String menuTitle;

    @NotBlank(message = "图标必须得传", groups = {DirectoryGroup.class, MenuGroup.class})
    private String menuIcon;

    @NotBlank(message = "路由地址不能为空", groups = {DirectoryGroup.class, MenuGroup.class})
    private String routerPath;
    private int sort;
    @NotNull(message = "上级id必须有值", groups = {DirectoryGroup.class, MenuGroup.class, BtnGroup.class})
    private Long parentId;
    @NotBlank(message = "添加组件地址", groups = {MenuGroup.class})
    private String component;
    @GenderEnum(values = {0, 1, 2}, message = "类型必须得是0 1 2 ", groups = {DirectoryGroup.class, MenuGroup.class, BtnGroup.class})
    private int menuType;
    @NotBlank(message = "权限标识不能为空", groups = {MenuGroup.class, BtnGroup.class})
    private String permSign;


}
